package com.coolwen.spring.speciality.util;

import com.coolwen.spring.speciality.model.Book;

import java.util.List;

/**
 * @author CoolWen
 * @version 2020-04-09 9:23
 */
public class BookUtil {
    public static double calPrice(List<Book> books) {
        return books.stream().mapToDouble(s -> s.getPrice()).sum();
    }
}
